package nl.vu.few.ibivu.biomodels.client.ui.base;

import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.gwt.user.client.ui.IsWidget;
import com.smartgwt.client.widgets.Canvas;

public class ContentCanvas extends Canvas implements AcceptsOneWidget {

	@Override
	public void setWidget(IsWidget w) {
		for (Canvas c : this.getChildren()) {
			c.setVisible(false);
		}
		if (w != null) {
			this.addChild(w.asWidget());
			w.asWidget().setVisible(true);
		}
	}

}
